//
//  DateHandel.h
//  Streaming
//
//  Created by 官琛 on 15-6-26.
//  Copyright (c) 2015年 liuxun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "Person.h"
#import "Photo.h"
#import "Cemera.h"//排行
#import "goods.h"
#import "Movie.h"
#import "Coming.h"
#import "Real.h"//热点
#import "coment.h"//影评
#import "Prevue.h"//预告片
#import "web.h"
@interface DateHandel : NSObject
-(void)openDB;
+(instancetype)shareHandle;

-(void)dropTable;
-(void)deleteTable:(NSString *)movieId;
-(NSMutableArray *)selectAllMovie;
-(void)updateTable:(Movie *)mov nameId:(NSString *)nameId;
-(void)insertMovie:(Movie *)mov;
-(void)createTable;

-(void)createComingTable;
-(void)insertcomingMovie:(Coming *)mov;
-(void)updateComingMovieTable:(Coming *)mov nameId:(NSString *)nameId;
-(void)deleteComingMovieTable:(NSString *)movieId;
-(NSMutableArray *)selectAllComingMovie;
-(void)dropComingMovieTable;

-(void)createRankingTable;
-(void)insertRanking:(Cemera *)cemera;
-(void)updateRankingTable:(Cemera *)cemera nameId:(NSString *)nameId;
-(void)deleteRankingTable:(NSString *)cemera;
-(NSMutableArray *)selectRanking;
-(void)dropRankingTable;

-(NSMutableArray *)selectAllComment;
-(void)insertComment:(coment *)comment;
-(void)createCommentTable;
-(void)dropCommentTable;

-(void)dropRealTable;
-(NSMutableArray *)selectAllReal;
-(void)insertReal:(Real *)real;
-(void)createRealTable;


-(void)createPrevueTable;
-(void)insertPrevue:(Prevue *)Prevue;
-(NSMutableArray *)selectAllPrevue;
-(void)dropPrevueTable;

-(void)dropCollectTable;
-(NSMutableArray *)selectAllCollect;
-(void)deleteCollectTable:(NSString *)idd;
-(void)updateCollectTable:(web *)web nameId:(NSString *)nameId;
-(void)insertCollect:(web *)web;
-(void)createCollectTable;
@end
